From: Gianni Tedesco Date: Tue, 11 Jan 2011 18:57:16 +0000 (+0000) Subject: tools/python/pyxl: Allow subclassing of auto-generated python types X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10931^2~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=a1744733176ff3d3a1d37a0e6d7c060bd96ba9a3;p=xen.git tools/python/pyxl: Allow subclassing of auto-generated python types Signed-off-by: Gianni Tedesco Committed-by: Ian Jackson --- diff --git a/tools/python/genwrap.py b/tools/python/genwrap.py index fd2d39dd6e..314e39dacf 100644 --- a/tools/python/genwrap.py +++ b/tools/python/genwrap.py @@ -151,7 +151,7 @@ static PyTypeObject Py%s_Type= { NULL, /* tp_getattro */ NULL, /* tp_setattro */ NULL, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ "%s", /* tp_doc */ NULL, /* tp_traverse */ NULL, /* tp_clear */ diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 9b47153f73..9b5dcd3cd7 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -628,7 +628,7 @@ static PyTypeObject PyXlType = { NULL, /* tp_getattro */ NULL, /* tp_setattro */ NULL, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ "libxenlight connection", /* tp_doc */ NULL, /* tp_traverse */ NULL, /* tp_clear */